<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<h1>首页</h1>
</body>
<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.js"></script>
<script>
    $(function () {
        var token = $.cookie('token');
        console.log(token);
        $.cookie('token', '', { expires: -1 });
        if (token == null){
            window.location.href = '/view/login';
        }
    });
</script>
</html>